#ifndef WARNAXISFORM_H
#define WARNAXISFORM_H

#include <QWidget>
#include<QMap>
#include<QDateTime>
#include<QThread>
#include<QTextEdit>
namespace Ui {
class WarnAxisForm;
}

class WarnAxisForm : public QWidget
{
    Q_OBJECT

public:
    explicit WarnAxisForm(QWidget *parent = nullptr);
    ~WarnAxisForm();
    void setIO();
    void threadRun();
    bool GetBitValue(int value,ushort index);


protected:
    void showEvent(QShowEvent *events) override;

private:
    Ui::WarnAxisForm *ui;
    //bool setIOFlag=false;   //设置参数
    bool keepOpen=false;    //开启

    //错误信息
    QMap<int,QString> warnMes;
    int lastMesNum[4]={0,0,0,0};
    QDateTime timeNow=QDateTime::currentDateTime();
    QThread th;
private slots:
    void SetTextSlot(const QString&str,int i);
signals:
    void SetTextSignal(const QString&str,int i);

};

#endif // WARNAXISFORM_H
